package com.ruoyi;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import java.security.SecureRandom;

/**
 * web容器中进行部署
 *
 * @author ruoyi
 */
public class RuoYiServletInitializer extends SpringBootServletInitializer
{
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
    {
        return application.sources(RuoYiApplication.class);
    }

//    public static void main(String[] args) {
//        String characters = "ABCDEFGHIJKLMNOPQRSTP1FNAxHj8t4ZxNvnouUgYfufDPc6dYxJu123456789";
//        StringBuilder key = new StringBuilder();
//        SecureRandom random = new SecureRandom();
//
//        for (int i = 0; i < 32; i++) {
//            int index = random.nextInt(characters.length());
//            key.append(characters.charAt(index));
//        }
//
//        System.out.println("Generated Key: " + key.toString());
//    }
}
